if __name__ == '__main__':
    # 外层循环控制的行
    i = 1  # 行数控制，范围是 1-4
    while i <= 4:
        # print("*")
        j = 4
        # 输出三角形
        while j - i >= 0:
            print(" ", end="")
            j = j - 1
        # 输出 * 字符
        # print("*****", end="")
        k = 5
        while k > 0:
            print("*", end="")
            k = k - 1
        print()
        # 改变循环控制变量的值
        i = i + 1
